package com.yonyou.cyxdms.basedata.service.entity.productOption;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.yonyou.cyxdms.framework.bean.entity.base.DMSBasePO;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

import java.io.Serializable;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yonyou.cyx.framework.bean.dto.base.BaseDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author zys
 * @since 2020-02-10
 */
@TableName("tm_vs_product_option")
public class VsProductOptionPO extends DMSBasePO<VsProductOptionPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
        @TableId(value = "PRODUCT_OPTION_ID", type = IdType.AUTO)
        private Long productOptionId;
    /**
     * 整车产品_ID
     */
    @TableField("PRODUCT_ID")
    private Long productId;
    /**
     * 选装ID
     */
    @TableField("OPTION_ID")
    private Long optionId;
    /**
     * 是否删除(0:未删除1:删除)
     */
    @TableField("IS_DELETED")
    @Version
    @TableLogic
    private Boolean isDeleted;
    /**
     * 公司代码
     */
    @TableField("COMPANY_CODE")
    private String companyCode;
    /**
     * 所有者代码
     */
    @TableField("OWNER_CODE")
    private String ownerCode;
    /**
     * 所有者的父组织代码（用于二网使用）
     */
    @TableField("OWNER_PAR_CODE")
    private String ownerParCode;
    
    @TableField("APP_ID")
    private String appId;
    public String getAppId() {
		return appId;
	}

	public void setAppId(String appId) {
		this.appId = appId;
	}

    public VsProductOptionPO() {
        super();
    }


    public Long getProductOptionId() {
        return productOptionId;
    }

    public void setProductOptionId(Long productOptionId) {
        this.productOptionId = productOptionId;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getOptionId() {
        return optionId;
    }

    public void setOptionId(Long optionId) {
        this.optionId = optionId;
    }

    public Boolean getDeleted() {
        return isDeleted;
    }

    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }

    public String getCompanyCode() {
        return companyCode;
    }

    public void setCompanyCode(String companyCode) {
        this.companyCode = companyCode;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public String getOwnerParCode() {
        return ownerParCode;
    }

    public void setOwnerParCode(String ownerParCode) {
        this.ownerParCode = ownerParCode;
    }

    @Override
    protected Serializable pkVal() {
        return this.productOptionId;
    }

    @Override
	public String toString() {
		return "VsProductOptionPO [productOptionId=" + productOptionId + ", productId=" + productId + ", optionId="
				+ optionId + ", isDeleted=" + isDeleted + ", companyCode=" + companyCode + ", ownerCode=" + ownerCode
				+ ", ownerParCode=" + ownerParCode + ", appId=" + appId + "]";
	}

	/**
     * 将PO 信息转化为DTO
     *
     * @param dto 需要进行转换的dto
     * @author zys
     * @since 2018/7/22 0022
     */
    protected <T extends BaseDTO> void transDtoToPo(T dto) {
        BeanMapperUtil.copyProperties(this, dto, "productOptionId");
    }


}
